package com.zier;

import android.app.Application;

import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.umeng.socialize.Config;
import com.umeng.socialize.PlatformConfig;
import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.common.QueuedWork;


public class App extends Application {

    public static IWXAPI wxapi;
    public  static App api;

    @Override
    public void onCreate() {

        super.onCreate();
        //开启debug模式，方便定位错误，具体错误检查方式可以查看http://dev.umeng.com/social/android/quick-integration的报错必看，正式发布，请关闭该模式
        Config.DEBUG = true;
        QueuedWork.isUseThreadPool = false;
        UMShareAPI.get(this);
        //微信支付
        wxapi = WXAPIFactory.createWXAPI(this, null);
        wxapi.registerApp("wx90e4b9de4dd9165f");
        api = this;



    }

    public static App getInstance() {
        return api;
    }

    //各个平台的配置，建议放在全局Application或者程序入口
    {
        PlatformConfig.setWeixin("wx90e4b9de4dd9165f", "d7b7cf5e5217c7ac83fd463101b36f8f");


    }
}
